package com.base.rq;

import android.app.Application;

import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechUtility;
import com.iflytek.speech.Speaker;

/**
 * @author RQ
 * date    2021-07-12 15:22
 */
public class BaseApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();
    if (Speaker.needXunFei(this)) {
      StringBuffer param = new StringBuffer();
      param.append("appid=" + getString(R.string.app_xunfei_id));
      param.append(",");
      // 设置使用v5+
      param.append(SpeechConstant.ENGINE_MODE + "=" + SpeechConstant.MODE_MSC);
      SpeechUtility.createUtility(this, param.toString());
    }
  }
}
